package com.zyy.seckill.vo;

import lombok.*;

/**
 * 公共返回枚举
 *
 * @Author: zyy
 * @DateTime: 2021/10/3 17:38
 */

@Getter
@AllArgsConstructor
@ToString
public enum RespEnum {
    // 通用模块
    SUCCESS(200, "SUCCESS"),
    FAILED(500,"服务异常"),

    // 登录模块5002xx
    LOGIN_ERROR(500210,"用户名密码不正确"),
    MOBILE_ERROR(500211,"手机号验证错误"),
    BIND_ERROR(500212,"参数校验异常"),
    MOBILE_NOT_EXIST(500213,"手机号码不存在"),
    PASSWORD_UPDATE_FAIL(500214,"更新密码失败"),
    SESSION_ERROR(500215,"用户不存在"),

    //秒杀模块 5005xx
    EMPTY_STOCK(500500,"库存不足"),
    REPEAT_STOCK(500501,"该商品每人限购一件"),
    REQUEST_NOT_EXIST(500300,"非法请求,请重试"),
    CAPTCHA_ERROR(500503,"验证码错误"),
    ACCESS_LIMIT(500504,"频繁访问"),

    // 订单模块5003xx
    ORDER_NOT_EXIST(500300,"订单信息不存在")

        ;


    private final long code;
    private final String message;



}
